﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _018传值_输出_引用_数组_具名_可选参数_8___具名参数
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //PrintName("cheche", 20);
            //具名参数
            PrintName(age: 20, name: "cheche");
            PrintParams();
        }
        static void PrintName(string name, int age) {
            Console.WriteLine("name:{0},age:{1}",name,age);
        }

        static void PrintParams(string name = "可选参数") {
            Console.WriteLine("name:{0}",name);
        }
    }
}
